<!--<?php
print <<<EOT
-->
<style type="text/css">
body{background:#fff;}
.border{border:3px solid #ccc;}
.credits {color: #999;font: 14px Georgia,Helvetica,sans-serif,Verdana,Arial,"Times New Roman", Times, serif;position:absolute;top:400px;left:10px;}
	
body div#tooltip { position:absolute;z-index:1000;max-width:220px;width:auto !important;width:220px;background:#002C4F;text-align:left;padding:5px;min-height:1em;}
body div#tooltip p { margin:0;padding:0;color:#fff;font:12px verdana,arial,sans-serif; }
body div#tooltip p em { display:block;margin-top:3px;color:#f60;font-style:normal;font-weight:bold; }
</style>

<script type="text/javascript">
var sweetTitles = {
	x : 10,								// @Number: x pixel value of current cursor position
	y : 20,								// @Number: y pixel value of current cursor position
	tipElements : "a",	    			// @Array: Allowable elements that can have the toolTip,split with ","
	init : function() {
		$(this.tipElements).mouseover(function(e){
											  
			this.myTitle = this.title;
			//this.myHref = this.href;
			//this.myHref = (this.myHref.length > 30 ? this.myHref.toString().substring(0,30)+"..." : this.myHref);
			this.title = "";
			//var tooltip = "<div id='tooltip'><p>"+this.myTitle+"<em>"+this.myHref+"</em>"+"</p></div>";
			var tooltip = "<div id='tooltip'><p>"+this.myTitle+"</p></div>";
			//if(this.myTitle.trim()!="")
			if(this.myTitle.trim()!=""&&this.myTitle.trim()!="undefined"&&this.myTitle.trim()!=null)
			{
				$('body').append(tooltip);
				$('#tooltip')
					.css({
						"opacity":"1",
						"top":(e.pageY+20)+"px",
						"left":(e.pageX+10)+"px"
					}).show('fast');	
			}
				
		}).mouseout(function(){
			this.title = this.myTitle;
			$('#tooltip').remove();
		}).mousemove(function(e){
			$('#tooltip')
			.css({
				"top":(e.pageY+20)+"px",
				"left":(e.pageX+10)+"px"
			});
		});
	}
};
/*$(function(){		    
	sweetTitles.init();
});*/

$(window).ready(function(){
sweetTitles.init();
})

</script>

<script src="css/edit.js"></script>
<script>
<!--
function printall(id, subid) {
    if(subid>0) {
        url = "printall.php?categoryid="+id+"&subcategoryid="+subid;
    } else { 
        url = "printall.php?categoryid="+id;
    }
    open(url);
}

function addWishlist(id, code) {
    url = "wishlist_view.php?act=add&pid="+id+"&code="+code;
    document.getElementById('addwishlistiframe').src=url;
}

//function validate(tform) {

//    var id_ary = $js_id_ary_str;
//    var qty_flag = 0;
//    
//    for (var i=0; i<id_ary.length; i++) {
//        
//        if (document.all('p_num['+id_ary[i]+']').value != '' && isDigit(document.all('p_num['+id_ary[i]+']').value) && parseInt(document.all('p_num['+id_ary[i]+']').value) > 0) {
//            qty_flag = 1;            
//        }       
//    }
//    
//    if (qty_flag == 0) {
//        alert('Please enter the order qty !');
//        return false;
//    }
//    
//    return true;
//   
//}
//-->
</script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//-->
</script>              
             
             $postiondiv 
	            <div class="main_search">					 
                $page_search
                <div align="center" class="paging_bar">{$PagerString}</div>
	            </div>
                 <div class="main">	 
                 <div class="lst_nav">	   
                $category_list    
				{$EnglishLink}            
                 	 <br/>
                  <br/>  
                 </div>
                <div class="lst_listing">      
            
                <td width="745" align="left" valign="top" background="./images/colour/jf_colour_navy_07.gif">               
                 
                  
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>                  
                  <iframe name='addwishlistiframe' width=0 height=0 src="about:blank" id='addwishlistiframe' style="display:none"></iframe>
                  <iframe name='addtocontentiframe' width=0 height=0 src="about:blank" id='addtocontentiframe' style="display:none"></iframe>                  
                  <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="548">
                      
                        <table width="740" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                          </tr>
                          <tr>
                            <td align="center" class="pageTitleText">{$page_show['str']}</td>
                          </tr>                          
                          <tr>
                            <td align="center" class="pageListings"></td>
                          </tr>
                        </table>
                        <div><img name="" src="./images/spacer.gif" width="538" height="5" alt=""></div></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                     
                    </tr>
                    
                  </table>
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>
                  
                  <!--<form action="cart_view.php" method="post" name="form1" onSubmit="return validate(this)" target="addtocontentiframe">-->
    	    	  <input type="hidden" name="act" value="adddate">
    	    	  <input type="hidden" name="inventoryid" value="0">
    	    	  <input type="hidden" name="inventorytype" value="0">
    	    	  <input type="hidden" name="intype" value="0">
    	    	  <input type="hidden" name="js" value="1">
                  <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"></td>
                      <td width="136"></td>
                      <td width="136"></td>
                      <td width="136"></td>
                      <td width="136"></td>
                      <td width="4"></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>

               
<!--
EOT;
$index = 1;
foreach ($photo_ary as $k=>$v) {
    $str = '';
    if ($index%4 == 0 && $index>3) {
        $str       = '<td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>';
        
    } else {
        $str = '';    
    }
    $start_limit_1 = $start_limit+$index;
    if (trim($v['small_pic']) == "" || !file_exists("attachments/" . $v['small_pic'])) {
        $v['small_pic'] = 'noCN.gif';
    }
    $price_show = '';
    if ($jansen_type==2) {
    	$v['price_2'] = number_format($v['price_2'], 2, '.', ',');
    	/*$price_show = '<div>MCP: ' . (float)$v['price_1'] . ' (美金)</div>
	                   <div>DCP: ' . (float)$v['price_2'] . ' (美金)</div>';*/
    	$price_show = '<div>美金 : ' . $v['price_2'] . '</div>';
    } elseif ($jansen_type == 1) {
    	$v['price_3'] = number_format($v['price_3'], 2, '.', ',');
    	//$price_show = '<div>HKWSP: ' . (float)$v['price_3'] . ' (HKD)</div>';
    	$price_show = '<div>HKD : ' . $v['price_3'] . ' </div>';
    }
    $product_name_show = '';
/*	if($v['namezh']!='')
	{
		$product_name_show = '<div style=\"min-height:30px;height:30px;overflow:hidden;line-height:15px;\">'.$v['namezh'].'</div>';
	}
	else if($v['name']!='')
	{
	   $product_name_show = '<div style=\"min-height:30px;height:30px;overflow:hidden;line-height:15px;\">'.$v['name'].'</div>';
	}*/
	$product_name_show = '<div style=\"min-height:30px;height:30px;overflow:hidden;line-height:15px;\">'.$v['namezh'].'</div>';
	
	$productTitle="";
	
/*	if(trim($v['infozh'])!="")
	{
	  $productTitle=$v['infozh'];
	}
	else
	{
	   $productTitle=$v['info'];
	}
*/
	$productTitle=$v['infozh'];
	
    $new_show = '';
    if ($v['new_flag'] == 1) {
        $new_show = '&nbsp;&nbsp;<span class="new_show">新产品！</span>';
    }
print <<<EOT
-->    	

    	              <td align="center" valign="top">
    	                <table width="136" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                            <td bgcolor="FFFFFF" width="115"><img name="" src="./images/spacer.gif" width="115" height="10" alt=""></td>
                            
                          </tr>
                          <tr>
                            <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                            <td bgcolor="FFFFFF" width="115">
							<!--Image of {$v['code']}-->
							<div><a title="{$productTitle}" href="product_details.php?categoryid=$categoryid&pid={$v['id']}&curpage=$page#atpic"><img src="attachments/{$v['small_pic']}" alt="{$productTitle}" name="jf_product_images_sm_image_{$v['id']}" width="113" height="113" class="picture" id="jf_product_images_sm_image_{$v['id']}" border="0"></a></div>
                              <div><img src="./images/spacer.gif" width="115" height="5" alt=""></div>
                              <div align="left"><a href='product_details.php?categoryid=$categoryid&pid={$v['id']}&fid=$fid#atpic'><span class="EnTextFamily">{$v['code']}</span></a> {$new_show}</div>
                              <div><img src="./images/spacer.gif" width="115" height="5" alt=""></div>
                              <!--div><a href="product_details.php?categoryid=$categoryid&pid={$v['id']}&fid=$fid" onMouseOver="MM_swapImage('jf_button_view_image_{$v['id']}','','./images/button/jf_button_view_image-over.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="./images/button/jf_button_view_image.gif" alt="View Image for item " name="jf_button_view_image_{$v['id']}" width="115" height="15" border="0" id="jf_button_view_image_{$v['id']}"></a></div-->
                              $product_name_show
                              $price_show
                              
                            </td>
                           
                          </tr>
                         <!-- <tr>
                            <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                            <td bgcolor="FFFFFF" width="115"><img name="" src="./images/spacer.gif" width="115" height="10" alt=""></td>                            
                          </tr>
                         -->
                        </table>
                      </td>
                      $str

<!--
EOT;
    $index++;
} 
print <<<EOT
-->                                                          
                      
                      <td width="4" valign="bottom"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td align="left"><img name="" src="./images/spacer.gif" width="136" height="4" alt=""></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    
<!--
EOT;
if (!empty($photo_ary)) {
print <<<EOT
-->                     
                    
                 
                  
<!--
EOT;
} else {
print <<<EOT
-->      
                    <tr height=20 valign="middle"><td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td><td colspan=5 align="left" class=titles>&nbsp;<!--No product in this category.-->$noproductNote</td></tr>
<!--
EOT;
} 
print <<<EOT
--> 
                    
                  </table>
                <!--  </form> -->
                  
                   
             
              
           
        
          </div>
      <!-- right -->
      <div class="main_search" style="clear:both;" id="footPage">	
          <div  class="paging_bar">{$PagerString}</div>  	      
	    </div> 
          <br/><br/><br/>
   	</div>
	
<!--
EOT;
?>-->